import request from '@/utils/request'

// 查询预警指标配置列表
export function listWarning(query) {
  return request({
    url: '/system/warning/list',
    method: 'get',
    params: query
  })
}

// 查询预警指标配置详细
export function getWarning(ewId) {
  return request({
    url: '/system/warning/' + ewId,
    method: 'get'
  })
}

// 新增预警指标配置
export function addWarning(data) {
  return request({
    url: '/system/warning',
    method: 'post',
    data: data
  })
}

// 修改预警指标配置
export function updateWarning(data) {
  return request({
    url: '/system/warning',
    method: 'put',
    data: data
  })
}

// 删除预警指标配置
export function delWarning(ewId) {
  return request({
    url: '/system/warning/' + ewId,
    method: 'delete'
  })
}

// 导出预警指标配置
export function exportWarning(query) {
  return request({
    url: '/system/warning/export',
    method: 'get',
    params: query
  })
}